#include"comm.hpp"
#include<cstdio>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>

int main(){
    Init init;
    int fd=open(FIFOFILE,O_RDONLY);
    if(fd==-1){
        perror("open error\n");
    }
    while(true){
        char buffer[1024];
        int n=read(fd,buffer,sizeof(buffer));
        if(n==0) break;
        if(n==-1) return -1;
        cout<<"client say: "<<buffer<<endl;
    }
    return 0;
}